package com.ygqh.baby.service;

import com.ygqh.baby.ao.Message;
import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.ao.ResultSet;
import com.ygqh.baby.po.YgWholesaler;

import java.util.List;
import java.util.Map;

/**
 * @author Ss
 */
public interface YgWholesalerService {

    List<YgWholesaler> find();

    int findCount();

    YgWholesaler findById(Long id);

    int save(YgWholesaler ygWholesaler);

    int update(YgWholesaler ygWholesaler);

    ResultSet<YgWholesaler> search(QueryInfo queryInfo, String wholesalerName);

    List<YgWholesaler> findList(QueryInfo queryInfo, String wholesalerName);

    boolean validateNameIsUsable(String wholesalerName, Long id);

    Message edit(YgWholesaler wholesaler);

    /**
     * 批发商充值
     *
     * @param wholesaler
     */
    void updateRechargePrice(YgWholesaler wholesaler);

    /**
     * 添加应结金额
     *
     * @param wholesaler
     */
    void updateAmountDuePrice(YgWholesaler wholesaler);

    /**
     * 添加已结金额
     *
     * @param wholesaler
     */
    void updateAmountPrice(YgWholesaler wholesaler);

    /**
     * 获取批发商列表，作为订单平台
     *
     * @return platformNo : shopNo  ; platformName : wholesaler_name
     */
    List<Map<String, String>> findPlatformList();
}
